package com.ifdemo;

import java.util.Scanner;

/*
Switch-case的使用
*/
public class Demo2 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入星期几：");
        int weeknumber = sc.nextInt();
        /*switch (weeknumber) {
            case 1:
                System.out.println("星期一睡觉！");
                break;
            case 2:
                System.out.println("星期二玩游戏！");
                break;
            case 3:
                System.out.println("星期三出去玩！");
                break;
            case 4:
                System.out.println("星期四打台球台球！");
                break;
            case 5:
                System.out.println("星期五打排球！");
                break;
            case 6:
                System.out.println("星期六逛商场！");
                break;
            case 7:
                System.out.println("星期日休息！");
                break;

        }*/

        //jdk12版本
        switch (weeknumber) {
            case 1 -> System.out.println("11232");
            case 2 -> System.out.println("21232");
            case 3 -> System.out.println("31232");
            case 4 -> System.out.println("41232");
            case 5 -> System.out.println("51232");
            case 6 -> System.out.println("61232");
            case 7 -> System.out.println("71232");
        }
    }
}
